<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>Tekdaqc Firmware: TekDAQC_Locator.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="customstyle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="signature_logo_100x100.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">Tekdaqc Firmware
   &#160;<span id="projectnumber">1.0.0.0</span>
   </div>
   <div id="projectbrief">The firmware of the Tekdaqc.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('_tek_d_a_q_c___locator_8c.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">TekDAQC_Locator.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Allows for discovery of a TekDAQC on an Ethernet network.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="_tek_d_a_q_c___debug_8h_source.html">TekDAQC_Debug.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_tek_d_a_q_c___locator_8h_source.html">TekDAQC_Locator.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_telnet_server_8h_source.html">TelnetServer.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="_tek_d_a_q_c___b_s_p_8h_source.html">TekDAQC_BSP.h</a>&quot;</code><br/>
<code>#include &quot;<a class="el" href="boolean_8h_source.html">boolean.h</a>&quot;</code><br/>
<code>#include &quot;lwip/udp.h&quot;</code><br/>
</div>
<p><a href="_tek_d_a_q_c___locator_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a1c00feb154f59a515e12382b816678da"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_tek_d_a_q_c___locator_8c.html#a1c00feb154f59a515e12382b816678da">CMD_DISCOVER_TARGET</a>&#160;&#160;&#160;((uint8_t) 0x02)</td></tr>
<tr class="memdesc:a1c00feb154f59a515e12382b816678da"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encodes a response as being a locator status response.  <a href="#a1c00feb154f59a515e12382b816678da">More...</a><br/></td></tr>
<tr class="separator:a1c00feb154f59a515e12382b816678da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab46e92a2b73bcc701b497bed347d410c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_tek_d_a_q_c___locator_8c.html#ab46e92a2b73bcc701b497bed347d410c">LOCATOR_DATA_LENGTH</a>&#160;&#160;&#160;115U</td></tr>
<tr class="memdesc:ab46e92a2b73bcc701b497bed347d410c"><td class="mdescLeft">&#160;</td><td class="mdescRight">The length of the data packet returned.  <a href="#ab46e92a2b73bcc701b497bed347d410c">More...</a><br/></td></tr>
<tr class="separator:ab46e92a2b73bcc701b497bed347d410c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga7575264242a9cfd52bb8f652f6e81512"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga7575264242a9cfd52bb8f652f6e81512">TekDAQC_LocatorInit</a> (void)</td></tr>
<tr class="memdesc:ga7575264242a9cfd52bb8f652f6e81512"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initializes the TekDAQC locator service.  <a href="group__tekdaqc__locator.html#ga7575264242a9cfd52bb8f652f6e81512">More...</a><br/></td></tr>
<tr class="separator:ga7575264242a9cfd52bb8f652f6e81512"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9a0234c50ab9998b9fa891415aa74916"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga9a0234c50ab9998b9fa891415aa74916">TekDAQC_LocatorBoardTypeSet</a> (uint8_t type)</td></tr>
<tr class="memdesc:ga9a0234c50ab9998b9fa891415aa74916"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the board type in the locator response packet.  <a href="group__tekdaqc__locator.html#ga9a0234c50ab9998b9fa891415aa74916">More...</a><br/></td></tr>
<tr class="separator:ga9a0234c50ab9998b9fa891415aa74916"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga62434a6c5a62cde49547d0da6a11dc2d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga62434a6c5a62cde49547d0da6a11dc2d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga62434a6c5a62cde49547d0da6a11dc2d">TekDAQC_LocatorBoardIDSet</a> (const unsigned char *id)</td></tr>
<tr class="memdesc:ga62434a6c5a62cde49547d0da6a11dc2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the board ID in the locator response packet. <br/></td></tr>
<tr class="separator:ga62434a6c5a62cde49547d0da6a11dc2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaccaaedc4f7bf5caaa8617e1322d9f808"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#gaccaaedc4f7bf5caaa8617e1322d9f808">TekDAQC_LocatorClientIPSet</a> (uint32_t ip)</td></tr>
<tr class="memdesc:gaccaaedc4f7bf5caaa8617e1322d9f808"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the client IP address in the locator response packet.  <a href="group__tekdaqc__locator.html#gaccaaedc4f7bf5caaa8617e1322d9f808">More...</a><br/></td></tr>
<tr class="separator:gaccaaedc4f7bf5caaa8617e1322d9f808"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8231071de5c32c4bc9a504787974800a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga8231071de5c32c4bc9a504787974800a">TekDAQC_LocatorMACAddrSet</a> (const unsigned char MAC[])</td></tr>
<tr class="memdesc:ga8231071de5c32c4bc9a504787974800a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the MAC address in the locator response packet.  <a href="group__tekdaqc__locator.html#ga8231071de5c32c4bc9a504787974800a">More...</a><br/></td></tr>
<tr class="separator:ga8231071de5c32c4bc9a504787974800a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8110d62d8549fa33651305631a35f09e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga8110d62d8549fa33651305631a35f09e">TekDAQC_LocatorVersionSet</a> (uint32_t version)</td></tr>
<tr class="memdesc:ga8110d62d8549fa33651305631a35f09e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the firmware version in the locator response packet.  <a href="group__tekdaqc__locator.html#ga8110d62d8549fa33651305631a35f09e">More...</a><br/></td></tr>
<tr class="separator:ga8110d62d8549fa33651305631a35f09e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9404d8297647f20b2c1cf4736380c4ee"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_tek_d_a_q_c___locator_8c.html#a9404d8297647f20b2c1cf4736380c4ee">LocatorAppTitleSet</a> (const unsigned char *title)</td></tr>
<tr class="separator:a9404d8297647f20b2c1cf4736380c4ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6b8f76481961d8ada2321b8986fa3ae0"><td class="memItemLeft" align="right" valign="top">uint8_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#ga6b8f76481961d8ada2321b8986fa3ae0">TekDAQC_GetLocatorBoardType</a> (void)</td></tr>
<tr class="memdesc:ga6b8f76481961d8ada2321b8986fa3ae0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the board type from the locator packet data.  <a href="group__tekdaqc__locator.html#ga6b8f76481961d8ada2321b8986fa3ae0">More...</a><br/></td></tr>
<tr class="separator:ga6b8f76481961d8ada2321b8986fa3ae0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadbb41980f31e110577fe3acbddd9ffbd"><td class="memItemLeft" align="right" valign="top">unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#gadbb41980f31e110577fe3acbddd9ffbd">TekDAQC_GetLocatorBoardID</a> (void)</td></tr>
<tr class="memdesc:gadbb41980f31e110577fe3acbddd9ffbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the board ID from the locator packet data.  <a href="group__tekdaqc__locator.html#gadbb41980f31e110577fe3acbddd9ffbd">More...</a><br/></td></tr>
<tr class="separator:gadbb41980f31e110577fe3acbddd9ffbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaafdbc2afba38909a0dd9183e8a749d8a"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#gaafdbc2afba38909a0dd9183e8a749d8a">TekDAQC_GetLocatorIp</a> (void)</td></tr>
<tr class="memdesc:gaafdbc2afba38909a0dd9183e8a749d8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the board IP address from the locator packet data.  <a href="group__tekdaqc__locator.html#gaafdbc2afba38909a0dd9183e8a749d8a">More...</a><br/></td></tr>
<tr class="separator:gaafdbc2afba38909a0dd9183e8a749d8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac2bef6dcb2ec0a768d5dd6523e4b5339"><td class="memItemLeft" align="right" valign="top">unsigned char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#gac2bef6dcb2ec0a768d5dd6523e4b5339">TekDAQC_GetLocatorMAC</a> (void)</td></tr>
<tr class="memdesc:gac2bef6dcb2ec0a768d5dd6523e4b5339"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the board MAC address from the locator packet data.  <a href="group__tekdaqc__locator.html#gac2bef6dcb2ec0a768d5dd6523e4b5339">More...</a><br/></td></tr>
<tr class="separator:gac2bef6dcb2ec0a768d5dd6523e4b5339"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaf826dd1488881cbe0360a51168fde64b"><td class="memItemLeft" align="right" valign="top">uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__tekdaqc__locator.html#gaf826dd1488881cbe0360a51168fde64b">TekDAQC_GetLocatorVersion</a> (void)</td></tr>
<tr class="memdesc:gaf826dd1488881cbe0360a51168fde64b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the board firmware version from the locator packet data.  <a href="group__tekdaqc__locator.html#gaf826dd1488881cbe0360a51168fde64b">More...</a><br/></td></tr>
<tr class="separator:gaf826dd1488881cbe0360a51168fde64b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The locator listens for specially formatted UDP packets</p>
<dl class="section author"><dt>Author</dt><dd>Jared Woolston (<a href="#" onclick="location.href='mai'+'lto:'+'jwo'+'ol'+'sto'+'n@'+'ten'+'ki'+'v.c'+'om'; return false;">jwool<span style="display: none;">.nosp@m.</span>ston<span style="display: none;">.nosp@m.</span>@tenk<span style="display: none;">.nosp@m.</span>iv.c<span style="display: none;">.nosp@m.</span>om</a>) </dd></dl>
<dl class="section since"><dt>Since</dt><dd>v1.0.0.0 </dd></dl>

<p>Definition in file <a class="el" href="_tek_d_a_q_c___locator_8c_source.html">TekDAQC_Locator.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a1c00feb154f59a515e12382b816678da"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CMD_DISCOVER_TARGET&#160;&#160;&#160;((uint8_t) 0x02)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Encodes a response as being a discovery target.</p>

<p>Definition at line <a class="el" href="_tek_d_a_q_c___locator_8c_source.html#l00051">51</a> of file <a class="el" href="_tek_d_a_q_c___locator_8c_source.html">TekDAQC_Locator.c</a>.</p>

</div>
</div>
<a class="anchor" id="ab46e92a2b73bcc701b497bed347d410c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define LOCATOR_DATA_LENGTH&#160;&#160;&#160;115U</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="_tek_d_a_q_c___locator_8c_source.html#l00058">58</a> of file <a class="el" href="_tek_d_a_q_c___locator_8c_source.html">TekDAQC_Locator.c</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a9404d8297647f20b2c1cf4736380c4ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void LocatorAppTitleSet </td>
          <td>(</td>
          <td class="paramtype">const unsigned char *&#160;</td>
          <td class="paramname"><em>title</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function sets the application title in the locator response packet. The string is truncated at 64 characters if it is longer (without a terminating 0), and is zero-filled to 64 characters if it is shorter.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">title</td><td>const char* Pointer to a C-String containing the application title string. </td></tr>
  </table>
  </dd>
</dl>
<dl class="retval"><dt>Return values</dt><dd>
  <table class="retval">
    <tr><td class="paramname">none</td><td></td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_tek_d_a_q_c___locator_8c_source.html#l00300">300</a> of file <a class="el" href="_tek_d_a_q_c___locator_8c_source.html">TekDAQC_Locator.c</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_8e5de21ae2c0e2e52ebd9b2e1880b407.html">TekDAQC_Libraries_Firmware</a></li><li class="navelem"><a class="el" href="dir_67f0fcbf6c112b8aef12a4e483003963.html">src</a></li><li class="navelem"><a class="el" href="_tek_d_a_q_c___locator_8c.html">TekDAQC_Locator.c</a></li>
    <li class="footer">Generated on Tue Mar 18 2014 17:47:45 for Tekdaqc Firmware by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.6 </li>
  </ul>
</div>
</body>
</html>
